package day06;

import java.util.Random;

public class MethodDemo {
    public static void main(String[] args) {
        say();
        say("迪卢克",27);

        int a=11,b=5;
        int c=sum(a,b);
        System.out.println(c);

        int[]d=arr(10,100);
        System.out.println(d.length);
        for (int i=0;i<d.length;i++){
            System.out.print(d[i]+"\t");
        }
        System.out.println();


    }
    public  static  void  say(){
        System.out.println("大家好");
    }
    public  static  void  say(String name,int age ){
        if (age>=60){
            return;
        }
        System.out.println("大家好我叫"+name+"今年"+age+"岁了");
    }
    public static  int sum(int num1 ,int num2){
        int num = num1+num2;
        return num;
    }
    public  static  int[] arr(int a,int b ){
        Random rd = new Random();

        int[] arr1 = new  int[a];
        for(int i =0;i<arr1.length;i++){
            arr1[i]=rd.nextInt(b);
        }
        return arr1;
    }



}
